#include<iostream>
#include<cmath>
using namespace std;
int n,r,h1[100009],h2[100009],ans,m;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++){
        cin>>r;
        h2[r]++,h1[r]++;
        m=max(m,r);
    }
    ans=n;
    for(int i=1;i<=m;i++){
        int j=i;
        while(h1[i]&&j<=m){
            j++;
            if(h2[j]){
                if(h1[i]>h2[j]){
                    h1[i]-=h2[j];
                    ans-=h2[j];
                    h2[j]=0;
                }
                else {
                    h2[j]-=h1[i];
                    ans-=h1[i];
                h1[i]=0;
                break;
                }
            }
        }
    }
    cout<<ans;
    return 0;
}
